<script setup>
// 导入 api
import { reactive, computed } from 'vue'

// 响应对象
const obj = reactive({
    count: 1
})

// 一个计算属性 ref
const publishedBooksMessage = computed(() => {
    return obj.count > 5 ? 'Yes' : 'No'
})
</script>

<template>
    <p>是否大于5</p>
    <span>当前：{{ obj.count }}</span>
    <br>
    <span>{{ publishedBooksMessage }}</span>
    <br>
    <input type="button" value="点击" @click="obj.count++">
</template>